<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <h2>style绑定</h2>
      <!-- style也是做了特殊的增强，允许我们使用对象的语法 -->
      <!-- key表示css的属性，value表示的是变量或者表达式 -->
      <!-- 如果出现了有连字符的属性，要转成小驼峰或者加引号 -->
      <p :style="{ color: color2, fontSize: size + 'px' }">hello Vue!</p>
    </div>

    <script src="./lib/Vue3.js"></script>
    <script>
      const { createApp } = Vue;

      createApp({
        data() {
          return {
            color2: "red",
            size: 30,
          };
        },
      }).mount("#app");
    </script>
  </body>
</html>
